home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / monochrome.swf / scripts / frame_25 / PlaceObject2_504_271 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-26  |  659 b   |  31 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "shipCU")
  3.    {
  4.       _Y = _Y + Math.random() * 6;
  5.       if(_X < -100 || _X > 650 || _Y < -100 || _Y > 500 || _root.rem == true)
  6.       {
  7.          removeMovieClip(this);
  8.       }
  9.       var i = 0;
  10.       while(i <= 20)
  11.       {
  12.          if(sh.harea.hitTest(_root["hmn" + i]))
  13.          {
  14.             life -= _root["hmn" + i].dmg;
  15.             sh.play();
  16.             removeMovieClip(_root["hmn" + i]);
  17.          }
  18.          i++;
  19.       }
  20.       if(_root.ship.sh.hitTest(sh.harea))
  21.       {
  22.          play();
  23.          _root.ship.play();
  24.       }
  25.       if(life <= 0)
  26.       {
  27.          play();
  28.       }
  29.    }
  30. }
  31.